
=== SYNOPSIS ===
{{{
#include <xp/sys/utl.h>

int xp_canceltimedhalt (void);
}}}

=== DESCRIPTION ===
'''''xp_canceltimedhalt()''''' cancels the halt operation initiated with [xp_halt(),xp-sys-utl_halt] in a timed fashion.

=== RETURN VALUE ===
0 is returned on success while -1 is returned on error.

=== EXAMPLE ===
{{{
#include <xp/sys/utl.h>
#include <xp/bas/stdio.h>

int xp_main (int argc, xp_char_t* argv[])
{
	if (argc > 2) {
		xp_fprintf (xp_stderr, XP_TEXT("usage: %s [cancel]\n"), argv[0]);
		return -1;
	}

	if (argc == 1)  {
		if (xp_halt (XP_HALT_RESTART, XP_HALT_TIMED, 
			(xp_time_t)100000, XP_TEXT("Restarting system...")) == -1) {
			xp_fprintf (xp_stderr, XP_TEXT("cannot initiate reboot\n"));
			return -1;
		}
	}
	else  {
		if (xp_canceltimedhalt() == -1) {
			xp_fprintf (xp_stderr, XP_TEXT("cannot cancel reboot\n"));
			return -1;
		}
	}

	return 0;
}
}}}
